# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-top2vec
_pkgname=top2vec
pkgver=1.0.36
pkgrel=1
pkgdesc='Learns jointly embedded topic, document and word vectors.'
arch=('any')
url='https://pypi.org/project/top2vec/#files'
license=('BSD')
depends=('python' 'python-umap-learn' 'python-numpy' 'python-scikit-learn'
         'python-gensim' 'python-hdbscan' 'python-matplotlib' 'python-joblib'
         'python-pandas' 'python-wordcloud')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('5b640b776598bd0b4e85347a4af5fe347c63bc8803ca0886673a4ea13c964806c178ca4d0ee0f06a751c48a09b9693fb033f6a554cfaf6b806b6ec13a930cc8c')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

